package com.toolbox;

import com.toolbox.utils.translate.TransApi;

public class TranslationTest {
    
    private static final String APP_ID = "20250927002465124";
    private static final String SECURITY_KEY = "LgSKaR3ei7FvKfZrdiXZ";
    
    public static void main(String[] args) {
        try {
            System.out.println("Testing Baidu Translate API integration...");
            
            // Create translation API instance
            TransApi api = new TransApi(APP_ID, SECURITY_KEY);
            
            // Test English translation
            String query = "Hello World";
            String result = api.getTransResult(query, "auto", "en");
            
            System.out.println("Original text: " + query);
            System.out.println("Translation result: " + result);
            
            System.out.println("Translation API test completed");
        } catch (Exception e) {
            System.err.println("翻译测试失败: " + e.getMessage());
            e.printStackTrace();
        }
    }
}